package com.ruoyi.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 采集任务执行记录信息对象 task_execution_record
 *
 * @author ruoyi
 * @date 2025-04-30
 */
public class TaskExecutionRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 执行记录唯一标识 */
    private Long recordId;

    /** 关联采集任务表的 id */
    @Excel(name = "关联采集任务表的 id")
    private Long taskId;

    /** 执行时间 */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @Excel(name = "执行时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date executionTime;

    /** 执行状态（成功、失败等） */
    @Excel(name = "执行状态", readConverterExp = "成=功、失败等")
    private String executionStatus;

    /** 若执行失败，记录错误信息 */
    @Excel(name = "若执行失败，记录错误信息")
    private String errorMessage;

    //任务名称
    private String taskName;

    public String getTaskName() {
        return taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    public void setRecordId(Long recordId)
    {
        this.recordId = recordId;
    }

    public Long getRecordId()
    {
        return recordId;
    }

    public void setTaskId(Long taskId)
    {
        this.taskId = taskId;
    }

    public Long getTaskId()
    {
        return taskId;
    }

    public void setExecutionTime(Date executionTime)
    {
        this.executionTime = executionTime;
    }

    public Date getExecutionTime()
    {
        return executionTime;
    }

    public void setExecutionStatus(String executionStatus)
    {
        this.executionStatus = executionStatus;
    }

    public String getExecutionStatus()
    {
        return executionStatus;
    }

    public void setErrorMessage(String errorMessage)
    {
        this.errorMessage = errorMessage;
    }

    public String getErrorMessage()
    {
        return errorMessage;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("recordId", getRecordId())
            .append("taskId", getTaskId())
            .append("executionTime", getExecutionTime())
            .append("executionStatus", getExecutionStatus())
            .append("errorMessage", getErrorMessage())
            .toString();
    }
}
